package com.kexun.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kexun.entity.DO.Permission;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface PermissionMapper extends BaseMapper<Permission> {

    List<Permission> findByRoleId(int roleId);

    List<Permission> findAllPermission();

    int removeByroleId(@Param("rid") int rid, @Param("pid") int pid);

    int removeByroleId(int rid);

    int addPermissionId(@Param("rid") int rid, @Param("pid") int pid);

    List<Map<String, Object>> findList();

}
